//
//  UIViewController+PLNavigationBarButton.h
//
//  Created by KimmanYip on 2017/9/7.
//
//

/*
 * 导航栏扩展
 * 处理导航栏上的按钮
 */

#import <UIKit/UIKit.h>

@interface UIViewController (PLNavigationBarButton)

#pragma mark -设置导航栏按钮，修复iOS7 bar button 偏移的问题

/*
 * 通过UIBarButtonItem快速设置导航栏按钮
 * DefaultFixed 默认间距
 * fixedPX 自定义间距
 */
- (void)pl_setRightBarButtonItemWithDefaultFixed:(UIBarButtonItem*)item;

- (void)pl_setRightBarButtonItem:(UIBarButtonItem*)item fixedPX:(float)px;

- (void)pl_setRightBarButtonItemsWithDefaultFixed:(NSArray<UIBarButtonItem*>*)items;

- (void)pl_setRightBarButtonItems:(NSArray<UIBarButtonItem*>*)items fixedPX:(float)px;

- (void)pl_setLeftBarButtonItemWithDefaultFixed:(UIBarButtonItem*)item;

- (void)pl_setLeftBarButtonItem:(UIBarButtonItem*)item fixedPX:(float)px;

- (void)pl_setLeftBarButtonItemsWithDefaultFixed:(NSArray<UIBarButtonItem*>*)items;

- (void)pl_setLeftBarButtonItems:(NSArray<UIBarButtonItem*>*)items fixedPX:(float)px;

/*
 * 通过相关类型快速设置导航栏按钮
 */
- (void)pl_createLeftBarButtonItemWithTitle:(NSString*)title selector:(SEL)selector;

- (void)pl_createLeftBarButtonItemWithCustomView:(UIView*)cusView;

- (void)pl_createLeftBarButtonItemWithNormalImage:(NSString *)normalImage highlightImage:(NSString *)highlightImage selector:(SEL)selector;

- (void)pl_createLeftBarButtonItemWithNormalImage:(NSString *)normalImage highlightImage:(NSString *)highlightImage frame:(CGRect)frame selector:(SEL)selector;

- (void)pl_createRightBarButtonItemWithTitle:(NSString*)title selector:(SEL)selector;

- (void)pl_createRightBarButtonItemWithCustomView:(UIView*)cusView;

- (void)pl_createRightBarButtonItemWithNormalImage:(NSString *)normalImage highlightImage:(NSString *)highlightImage selector:(SEL)selector;

- (void)pl_createRightBarButtonItemWithNormalImage:(NSString *)normalImage highlightImage:(NSString *)highlightImage frame:(CGRect)frame selector:(SEL)selector;

#pragma mark -快速创建按钮
- (UIButton *)pl_createButtonWithNormalImage:(UIImage *)normalImage selector:(SEL)selector imageEdgeInsets:(UIEdgeInsets)imgInset;

- (UIButton *)pl_createButtonWithNormalImage:(UIImage *)normalImage highlightImage:(UIImage *)highlightImage selector:(SEL)selector;

- (UIButton *)pl_createButtonWithNormalImage:(UIImage *)normalImage highlightImage:(UIImage *)highlightImage selector:(SEL)selector imageEdgeInsets:(UIEdgeInsets)imgInset;

- (UIButton *)pl_createButtonWithTitle:(NSString *)normalTitle color:(UIColor *)color font:(UIFont*)font selector:(SEL)selector titleEdgeInsets:(UIEdgeInsets)titleInset;

#pragma mark -移除按钮（单个的)

//左上角按钮
- (void)pl_hideLeftButton;

//右上角按钮
- (void)pl_hideRightButton;


@end
